package com.base.components.common.db.driver;

/**
 * DatabaseDriverCheck 数据库配置检查
 *
 * @author <a href="drakelee1221@gmail.com">LiGeng</a>
 * @version v1.0.0
 * @date 2019-03-13 16:34
 */
public class DatabaseDriverCheck {

  public static void check(){
    mysql();
  }

  private static void mysql(){
    try {
      Class.forName("com.mysql.cj.jdbc.Driver");
      //用于此使用配置后 spring.datasource.driver-class-name: net.sf.log4jdbc.DriverSpy
      System.setProperty("log4jdbc.drivers", "com.mysql.cj.jdbc.Driver");
      System.setProperty("log4jdbc.auto.load.popular.drivers", "false");
    } catch (Exception ignore) {
    }
  }
}
